<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="app/save" data-auto="true" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">应用名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value='${obj.name!""}' required="required" title="请输入应用名称" placeholder="请输入应用名称" class="layui-input">
        </div>
    </div>
	<div class="layui-form-item">
        <label class="layui-form-label">过期时间</label>
      <div class="layui-input-inline">
        <input type="text" name="expiredTime" id="expired_time" value='<#if obj.expiredTime??>${obj.expiredTime?string("yyyy-MM-dd HH:mm:ss")}</#if>' required="required" title="请输入过期时间" lay-verify="date" placeholder="过期时间" autocomplete="off" class="layui-input">
      </div>
    </div>
	<div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-inline">
        	<select name="type" required="required" lay-verify="required">
			    <option value="1" <#if obj.type == 1 >selected</#if> >盒子</option>
			    <option value="2" <#if obj.type == 2 >selected</#if> >Android客户端</option>
			    <option value="3" <#if obj.type == 3 >selected</#if> >服务器</option>
		    </select>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        <#if obj.id??>
        <input type='hidden' value='${obj.id?c}' name='id'/>
        <input type='hidden' value='2' name='action'/>
       <#else>
        <input type='hidden' value='1' name='action'/>
        </#if>
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>
</form>
<#noparse>
<script>
laydate({
	  elem: '#expired_time',
	  format: 'YYYY-MM-DD hh:mm:ss', // 分隔符可以任意定义，该例子表示只显示年月
	  festival: true, //显示节日
	  istime: true, //显示时间选项 
	  start: laydate.now(),
	  choose: function(datas){ //选择日期完毕的回调
	    $("#expired_time").val(datas);
	  }
});
</script>
</#noparse>